package org.ykh.gmall.activity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.SchemaProperty;
import lombok.Data;
import org.ykh.gmall.base.BaseEntity;

import java.util.Date;

@Data
@Schema(description = "活动信息")
@TableName("activity_info")
public class ActivityInfo extends BaseEntity {
   
   private static final long serialVersionUID = 1L;
   
   @SchemaProperty(name = "活动名称")
   @TableField("activity_name")
   private String activityName;

   @SchemaProperty(name = "活动类型（满减、折扣）")
   @TableField("activity_type")
   private String activityType;

   @SchemaProperty(name = "活动描述")
   @TableField("activity_desc")
   private String activityDesc;

   @SchemaProperty(name = "开始时间")
   @TableField("start_time")
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   private Date startTime;

   @SchemaProperty(name = "结束时间")
   @TableField("end_time")
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   private Date endTime;

   @SchemaProperty(name = "创建时间")
   @TableField("create_time")
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   private Date createTime;

   // 活动类型
   @TableField(exist = false)
   private String activityTypeString;
}